package com.zenithmind.library.pojo.query;

import com.zenithmind.common.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 作者查询条件
 *
 * @author ZenithMind
 * @since 2024-06-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "作者查询条件", description = "作者查询的条件参数")
public class AuthorQuery extends BaseQuery {

    @Schema(description = "作者姓名", example = "鲁迅")
    private String name;

    @Schema(description = "作者英文名", example = "Lu Xun")
    private String nameEn;

    @Schema(description = "笔名", example = "周树人")
    private String penName;

    @Schema(description = "性别 (0-女, 1-男, 2-其他)", example = "1")
    private Integer gender;

    @Schema(description = "国籍", example = "中国")
    private String nationality;

    @Schema(description = "状态 (0-禁用, 1-启用)", example = "1")
    private Integer status;

    @Schema(description = "出生开始日期", example = "1800-01-01")
    private LocalDate birthStartDate;

    @Schema(description = "出生结束日期", example = "2000-12-31")
    private LocalDate birthEndDate;

    @Schema(description = "是否在世 (0-否, 1-是)", example = "0")
    private Integer isAlive;

    @Schema(description = "最小作品数量", example = "1")
    private Integer minBookCount;

    @Schema(description = "最大作品数量", example = "100")
    private Integer maxBookCount;

    @Schema(description = "关键词搜索", example = "文学")
    private String keyword;

    @Schema(description = "排序字段", example = "bookCount")
    private String sortField;

    @Schema(description = "排序方向 (asc/desc)", example = "desc")
    private String sortOrder;
}
